import java.security.MessageDigest

/**
 * Used to hash the password after it is entered by the user. Used when password is first
 * created or updated.
 * 
 * @author Vikram Somu
 *
 */

class SHACodec {
	
	static encode = {target->
		MessageDigest md = MessageDigest.getInstance('SHA')
		md.update(target.getBytes('UTF-8'))
		return new String(md.digest()).encodeAsBase64()
	}

	
		
}
